Enterprise Objects Framework Release 1.1 Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

EOTextAssociation 

Inherits From:	EOAssociation

Conforms To:	EOAssociationNotification (EOAssociation)

Declared In:	eointerface/EOTextAssociation.h

Class Description

An EOTextAssociation manages a Text object, and is capable of handling display of ASCII, RTF, and serialized RTF with attachments (RTFD). A text association monitors any editing done to the Text object, and when the Text object ends editing (for example, if the user presses Enter), the text association informs its controller.

When a text association is notified of a change by its controller, it gets the value of the first selected enterprise object as raw character data and examines it for an RTF or RTFD signature. The association then sends the appropriate message to its Text object for the format, allowing the Text object to properly display the value regardless of the format.

When asked for its value, however, a text association returns an NSString (NSData for RTFD) containing the text in whatever format its Text object uses:

Text Capability	Text Format

Single font	Plain text in an NSString object
Multiple fonts allowed	RTF in an NSString object
Graphics allowed	RTFD in an NSData object

This can cause problems if you associate a key whose corresponding value is of one type (such as plain text) with a Text object configured to edit another type (such as RTF). In this case the enterprise objects receive text in a format they may not be able to handle. You should always take care to match the text formats of the values you intend to display with the configuration of the Text object.

Although the interface of any association contains only a few methods, various implementations are often highly dependent on one another and on the way the destination objects act. Because of this, if you need to create an association class for a custom subclass of Text, you should create it as an immediate subclass of EOAssociation.

Instance Variables

None declared in this class.

Instance Methods

None declared in this class.